package cn.hnucm.web;

/**
 * @Author:liweihua
 * @Description:
 * @Date: 17:00$ 2021/12/18/018$
 * @Modified:
 */

import cn.hnucm.service.LoginService;
import cn.hnucm.utils.Result;
import cn.hnucm.utils.SpringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class LoginController {

    @Autowired
    LoginService loginService;
    @RequestMapping("/success")
    public Result success(){
        Map<String, Object> map = loginService.verifyUser();
        return Result.ok(map);
    }
    @RequestMapping("/failure")
    public Result failure(){
        return Result.error("登录失败，账号或者密码错误");
    }
}
